package com.xy.farm.activity.base;

import android.support.v4.app.Fragment;
import android.view.View;
import android.widget.Toast;

/**
 * Created by 1174607250 on 2018/8/5.
 */

public class BaseFragment extends Fragment implements View.OnClickListener
{
    @Override
    public void onClick(View v)
    {

    }
    private Toast toast;
    public void showShortToast(String str)
    {
        if (toast != null)
            toast.cancel();
        (toast = Toast.makeText(getActivity(), str, Toast.LENGTH_SHORT)).show();
    }
    public void showLongToast(String str)
    {
        if (toast != null)
            toast.cancel();
        (toast = Toast.makeText(getActivity(), str, Toast.LENGTH_LONG)).show();
    }
}
